$("document").ready(function(){
	//全选
	$("#selectallmsg").click(function(){
		checked = $(".choose input[name='msgid']:first").attr("checked");
		$(".choose input[name='delmsg[]']").attr("checked", !checked);
	});
	//删除
	$("#deletemsg").click(function(){
		$("#msgForm").submit();
	});
	//已读
	$(".msgtitle").click(function(){
		url = '/member/message.html?msgid='+$(this).attr('alt');
		//正文框
		currbody= $(this).parent().parent().find(".all");
		currbody.html('正在读取...').show();
		$.ajax({dataType:'text',
				url:url,
				success:function(msg)
				{
					currbody.html(msg);
				}
		}
				);
	});
});